GXEqualShape
You can use theGXEqualShape
function to determine if two shapes are equal.
boolean GXEqualShape(gxShape one, gxShape two);
one
- A reference to one of the shapes to test for equality.
two
- A reference to the other shape to test for equality.
- function result
true
if the shape specified by theone
parameter is equal to the shape specified by thetwo
parameter;false
otherwise.DESCRIPTION
TheGXEqualShape
function returns as its function result a Boolean value indicating whether the two QuickDraw GX shapes are equal. For two QuickDraw GX shapes to be equal, they must satisfy these requirements:
- They must have the same shape type and fill, but they do not need to have the same attributes, owner count, or tag list.
- Their geometries must have identical values; geometries that are equivalent but not identical are not considered to be equal. To eliminate false rejection of equivalent geometries, call the
GXSimplifyShape
function to simplify both shapes before you callGXEqualShape
.
ERRORS, WARNINGS, AND NOTICES
Errors out_of_memory shape_is_nil SEE ALSO
Equivalent geometries are described in the section "Copying, Comparing, and Cloning Shape Objects" beginning on page 2-25. TheGXSimplifyShape
function is described in the geometric shapes chapter of Inside Macintosh: QuickDraw GX Graphics.To make a copy of a shape object that is equal by the criteria of this function, use the
GXCopyToShape
function, described on page 2-57.